<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>二手车交易记录界面</title>
    <!--加载layui的css样式-->
    <link rel="stylesheet" href="/aaa/layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/aaa/layuiadmin/style/admin.css" media="all">
    <!--照片栏高度-->
    <style>
        .layui-table-cell{
            height:80px;
            line-height: 80px;

        }

    </style>

</head>
<body>


<div class="layui-fluid">
    <div class="layui-card">
        <!--搜索菜单栏-->
        <div class="layui-form layui-card-header layuiadmin-card-header-auto">
            <!--搜索条件-->
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">原车主手机号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="oldtelephone" id="oldtelephone" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">新车主手机号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="newtelephone" id="newtelephone" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">电瓶车出厂码：</label>
                    <div class="layui-input-block">
                        <input type="text" name="carcode" id="carcode" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">交易员工号：</label>
                    <div class="layui-input-block">
                        <input type="text" name="employeeid" id="employeeid" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">交易时间段：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="begintime" id="begintime" placeholder="yyyy-MM-dd" class="layui-input">
                    </div>

                </div>

                <div class="layui-inline">
                    <label class="layui-form-label">—：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="endtime" id="endtime" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <!--搜索按钮-->
                <div class="layui-inline">
                    <button id="transferrecord-searchbtn" class="layui-btn layuiadmin-btn-admin" lay-submit lay-filter="LAY-user-back-search">
                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                    </button>
                </div>
            </div>
        </div>
        <!--查询出的信息栏-->
        <div class="layui-card-body">
            <table class="layui-hide" id="transferrecord" lay-filter="transferrecord-filter"></table>
            <!--前缀编号-->
            <script type="text/html" id="addList">
                {{d.LAY_TABLE_INDEX+1}}
            </script>
            <!--layui的js包-->
            <script src="/aaa/layuiadmin/layui/layui.js"></script>

        </div>
    </div>
</div>



<script th:inline="none">
    layui.use(['table','laytpl','form','laydate'], function(){
        var table = layui.table;
        var laytpl = layui.laytpl;
        var form = layui.form;
        var laydate=layui.laydate;
        var $ = layui.$;

        //时间控件监控
        laydate.render({
            elem:'#begintime',
            type:'datetime'
        });
        laydate.render({
            elem:'#endtime',
            type:'datetime'
        })
        //表格控件监控
        table.render({
            //连接搜索栏
            elem: '#transferrecord',
            height: 400,
            //跳转的地址信息
            url: '/aaa/SecondCarTransferRecordController/GetcartransferRecordMessage',
            //分页功能
            page: true,
            //列表中所查询的信息
            cols: [
                [
                    {field:'add', title: '编号',align:'center',templet:'#addList',width:50},
                    {field:'school',title:'交易门店',align:'center'},
                    {field:'newtelephone',title:'原车主手机号',align:'center'},
                    {field:'newtelephone',title:'新车主手机号',align:'center'},
                    {field:'goodsname',title:'电车型号',align:'center'},
                    {field:'carcode',title:'出厂码',align:'center'},
                    {field:'name',title:'交易员工',align:'center'},
                    {field:'createtime',title:'交易日期',align:'center'},
                ]
            ],


        });
        //搜索框点击事件-----------------------------------------------------------------------------------------------
        $('#transferrecord-searchbtn').click(function () {
            table.reload('transferrecord', {
                url: '/aaa/SecondCarTransferRecordController/GetcartransferRecordMessage',
                where: {
                    oldtelephone:$("#oldtelephone").val(),
                    newtelephone:$("#newtelephone").val(),
                    carcode:$("#carcode").val(),
                    employeeid:$("#employeeid").val(),
                    begintime:$("#begintime").val(),
                    endtime:$("#endtime").val(),
                } //设定异步数据接口的额外参数
                //,height: 300
            });
        })

        })

</script>

</body>
</html>